package com.fastshopping.order.dao;

import com.fastshopping.order.pojo.Material;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface MaterialMapper extends Mapper<Material> {
    
    
    /*
     * @Author zhangdan
     * @Description //TODO 根据商店id查询素材购买情况
     * @Date 22:08 2020/6/6
     * @Param [id]
     * @return com.fastshopping.order.pojo.Material
     **/
    @Select("SELECT \n" +
            "        `id`,\n" +
            "        `name`,\n" +
            "        `category`,\n" +
            "        `child_category`,\n" +
            "        `price`,\n" +
            "        `author_id`,\n" +
            "        `store_id`,\n" +
            "        `img`,\n" +
            "        `buy_status` \n" +
            "FROM\n" +
            "        `shopping`.`tb_material` \n" +
            "WHERE\n" +
            "\tstore_id=2")
    public List<Material> findMaterialById(int storeId);
}
